try:
    f=open("d:\\xba.txt","wt")
    f.write("My name is XuanBoao.\n帅哥一个")
    f.close()

    f=open("d:\\xba.txt","rt")
    s=f.read()
    print(s)
    f.close()
except Ellipsis as err:
    print(err)